Communication device apparatus and method utilizing pseudonoise signal for acoustical echo cancellation

ABSTRACT

A communication device, an apparatus, and a method for acoustic echo cancellation which makes use of a pseudonoise signal. An audio mixer adds the pseudonoise signal to an input signal received from another communication device to produce a first composite signal. An audio system converts the first composite signal to sound in an at least partially enclosed space. The at least partially enclosed space produces an acoustical echo in response. The audio system then converts the acoustical echo and other sounds in the at least partially enclosed space to a second composite signal. A signal processor cross-correlates the second composite signal with the pseudonoise signal to produce an estimate of the overall impulse response of the combined system formed by the at least partially enclosed space and the audio system. The processor then convolves the first composite signal with the impulse response estimate to produce an echo estimation signal. The echo estimation signal is an estimate of the component of the second composite signal which corresponds to the acoustical echo. The processor then subtracts the echo estimation signal from the second composite signal to produce an output signal.

The United States Government has certain rights in this inventionpursuant to Contract No. ITA 87-02 between the U.S. Department ofCommerce and Iowa State University.

FIELD OF THE INVENTION

The present invention relates generally to apparatuses and methods forcanceling an acoustical echo in an at least partially enclosed spacewhich is detected by the audio system of a communication device. Inparticular, it pertains to an apparatus and a method which cancel theacoustical echo by utilizing a pseudorandom noise signal to estimate theoverall impulse response of the combined system formed by the space andthe audio system.

BACKGROUND OF THE INVENTION

Many types of communication devices exist which allow for hands freecommunication between two parties in separate rooms. Such devicesinclude speakerphones, public address systems for auditoriums or meetingrooms, and audio/visual equipment for video classrooms. Furthermore, newtechnology is being rapidly developed which will make communicationdevices for audio/visual teleconferencing practical.

The rooms used for this type of communication are typically plagued byacoustical echoes (i.e. acoustical reverberations). These acousticalechoes arise when the far-end communication device provides the near-endcommunication device with a far-end output audio signal. This signal isthen converted to sound by the audio system of the near-endcommunication device. In response, an acoustical echo is produced withinthe room. The echo along with the near-end user's speech is converted toa near-end audio signal by the near-end audio system. The near-end audiosignal is then transmitted to the far-end communication device as thenear-end output audio signal. When this signal is converted to sound bythe audio system of the far-end communication device, the far-and userwill have difficulty sorting out the near-end speech from the acousticalecho.

A current approach to eliminating the acoustical echo is to use adiscrete-time linear adaptive filter. Such an adaptive filter is used toestimate the overall impulse response of the combined system formed bythe room and the near-end audio system. From this estimate, the adaptivefilter generates an estimation signal which estimates the component ofthe near-end audio signal produced by the near-end audio system whichcorresponds to the acoustical echo in the room. The estimation signal isthen subtracted from the audio signal to produce the near-end signal.

A major problem associated with this approach is that the convergencetime for estimating the overall impulse response of the room and audiosystem together may be much longer than the stationary period of theoverall impulse response. As a result, changes in the roomcharacteristics will lead to serious degradation of the performance ofthe adaptive filter because it cannot adapt rapidly enough. Such changesmay include doors being opened or closed, movement of furniture orpeople, or changes in the direction of the microphone of the audio,system.

Another flaw associated with this approach is that the presence ofnear-end speech is not readily handled by the adaptive filter. Whennear-end speech is added to the return path, it is suppressed by theadaptive filter. In order to alleviate this problem, conventionaladaptive filter echo cancelers employ near-end speech detectors. Thesedetectors are used to detect large near-end speech energy so that theadaptive filter computations can be suspended during the time intervalof the near-end speech. This means that echo canceling is suspendedduring near-end speech. One undesirable result of this is simplex orone-way conversations. A second undesirable result is the inability ofthe adaptive filter to adapt to room changes during the time interval ofthe near-end speech.

OBJECTS OF THE INVENTION

It is therefore an object of the invention to provide a communicationdevice, an apparatus, and a method for acoustical echo cancellationwhich can rapidly adapt to changes in room characteristics.

It is another object of the invention to provide a communication device,an apparatus, and a method for acoustical echo cancellation which doesnot suppress near-end speech.

It is still another object of the invention to provide a communicationdevice, an apparatus, and method for acoustical echo cancellation whichallows for full-duplex, hands-free, two-way conversation.

SUMMARY OF THE INVENTION

The foregoing and other objects of the invention are achieved by acommunication device, an apparatus, and a method for acoustic echocancellation which makes use of an acoustic pseudonoise signal. Thecommunication device includes the echo cancellation apparatus and anaudio system. The echo cancellation apparatus includes a pseudonoisesignal generator, an audio mixer, an analog-to-digital converter, adigital-to-analog converter, and a digital signal processor.

The audio mixer adds the pseudonoise signal to an input signal receivedfrom another communication device to produce a first composite signal.The audio system converts the first composite signal to sound in an atleast partially enclosed space. The at least partially enclosed spaceproduces an acoustical echo in response. The audio system then convertsthe acoustical echo and other sounds in the at least partially enclosedspace to a second composite signal.

The analog-to-digital converter samples the pseudonoise signal and thefirst and second composite signals and converts them to correspondingdigital signals. The digital signal processor cross-correlates thesecond composite signal with the pseudonoise signal to produce anestimate of the overall impulse response of the combined system formedby the at least partially enclosed space and the audio system. Theprocessor then convolves the first composite signal with the impulseresponse estimate to produce an echo estimation signal. The echoestimation signal is an estimate of the component of the secondcomposite signal which corresponds to the acoustical echo. Finally, theprocessor subtracts the echo estimation signal from the second compositesignal to produce a digital output signal. The digital output signal isthen converted to a corresponding analog output signal by thedigital-to-analog converter for transmission to the other communicationdevice.

BRIEF DESCRIPTION OF THE DRAWINGS

The foregoing and other objects of the invention will be more clearlyunderstood from the following detailed description and appended claimswhen read in connection with the following drawings, in which:

FIG. 1 shows a block diagram of an audio network having a near-endcommunication device in accordance With the present invention;

FIG. 2 shows a detailed illustration of the near-end communicationdevice of FIG. 1 including the near-end echo canceler and an associatednear-end audio system;

FIG. 3 shows a detailed illustration of the digital signal processor ofthe near-end echo canceler shown in FIG. 2;

FIG. 4 shows a flow diagram of the adaptive and cross-correlationroutines of the digital signal processor shown in FIG. 3;

FIG. 5 shows another embodiment of an audio network in accordance withthe present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIGS. 1-5 provide illustrations of the invention disclosed herein. Inthese figures, like components are designated by like numerals.

Referring initially to FIG. 1, there is shown a block diagram of afull-duplex audio network 10 which connects an at least partiallyenclosed near-end space 12 and an at least partially enclosed far-endspace 14. The at least partially enclosed spaces 12 and 14 may each be(1) a room in a building or home, (2) an auditorium, (3) a meeting room(4) a passenger compartment of a car, (5) a classroom, (6) ateleconferencing room or (7) some other at least partially enclosedstructure.

The audio network 10 of FIG. 1 includes a near-end communication device16 located in the near-end space 12 and a far-end communication device18 located in the far-end space 14. The near-end and far-endcommunication devices 16 and 18 may each be (1) a speakerphone for aroom or a car, (2) a public address (PA) system for a meeting room,auditorium, or classroom, (3) audio/visual equipment for a videoclassroom or a teleconferencing room, (4) a telephone, or (5) some othercommunication device having an audio system.

For the audio network 10 shown in FIG. 1, the far-end communicationdevice 18 includes a far-end audio system 20 but not an echo canceler.The far-end audio system 20 may be of the type commonly found in any ofthe communication devices which were described earlier as being suitablefor the far-end communication device 18.

As is described later in detail, the microphone 22 of the far-end audiosystem 20 detects the pressure waves of the far-end use's speech, s1(t),the far-end background noise, n1(t), and a far-end echo, e1(t). Thefar-end microphone 22 converts the detected pressure waves of thesesounds to an analog composite audio signal, v1(t).

The composite audio signal, v1(t), is then amplified and/or filteredwith the conventional audio electronics 26 of the far-end audio system20 to produce the analog far-end composite output audio signal, v2(t).This is done so that the far-end output audio signal, v2(t), can beproperly transmitted by the conventional transport system 28.

The far-end output audio signal, v2(t), is then transmitted by thetransport system 28 to the near-end communication device 16. Thistransmitted signal, v2(t), suffers only a minor amount of distortionduring the transmission process and is received by the near-endcommunication device 16 as the analog near-end audio input signal,y1(t). The transport system 28 may be (1) a satellite transmissionsystem, (2) a microwave transmission system, (3) a cellular transmissionsystem, (4) a fiber optic transmission system, (5) a wire transmissionsystem, or (6) some other similar transmission system.

FIG. 2 provides a more detailed illustration of the near-endcommunication device 16. It includes a near-end echo canceler 30 and anear-end audio system 32.

The Spread spectrum pseudonoise signal generator 34 of the near-end echocanceler 30 generates a spread spectrum pseudonoise signal, c(t), inanalog format. The spread spectrum signal, c(t), can be generated usingeither random binary pulse code modulation (PCM) or binary phase shiftkeying (BPSK). This signal, c(t), can have a code length approximatelyin the range of 4,000-300,000 chips and can be generated at a code rateapproximately in the range of 8,000-64,000 chips per second. Inaddition, this signal, c(t), can be generated as simply a basebandsignal or can be generated with a carrier component. Moreover, theamplitude of the spread spectrum signal, c(t), can be selected to beapproximately in the range 10-25 dB below the near-end input audiosignal (i.e. the received far-end output audio signal), y1(t).

In the preferred embodiment, the spread spectrum signal, c(t), has acode length of 262,143 chips and is generated as a baseband signal at acode rate of 8,000 chips per second. Also, in the preferred embodiment,the amplitude of the signal, c(t), is selected to be approximately 15 dBbelow the near-end input audio signal, y1(t).

The audio mixer 36 of the echo canceler 30 receives the spread spectrumsignal, c(t), and the near-end input audio signal (i.e. the receivedfar-end output audio signal), y1(t). The audio mixer 36 is of aconventional type and combines these signals, e(t) and y1(t), to producethe analog composite audio signal, y2(t)=y1(t)+c(t). This signal, y2(t),is the input to the near-end audio system 32.

The near-end audio system 32 may be of the type commonly found in any ofthe communication devices which were described earlier as being suitablefor the near-end communication device 16. However, the preferredembodiment of the audio system 32 is illustrated in FIG. 2.

As shown in FIG. 2, the near-end audio system 32 includes theconventional near-end audio electronics 38. The graphic equalizer 40 ofthe near-end audio electronics 38 receives the composite input audiosignal, y2(t), from the audio mixer 36 of the echo canceler 30. Thegraphic equalizer 40 is of a conventional type and is used to filter thecomposite input audio signal, y2(t), so that it can be properlyconverted to sound by the loudspeaker 42 of the audio system 32. In thepreferred embodiment, the graphic equalizer 40 filters out frequenciesof this signal, y2(t), which are not in the range of 200-4,000 Hz.

The audio power amplifier 44 of the near-end audio electronics 38receives the filtered composite audio signal, y3(t), from the graphicequalizer 40. The audio power amplifier 44 is of a conventional type andis used to drive the low impedance load of the loudspeaker 42. In otherwords, the audio power amplifier 44 amplifies the filtered compositeaudio signal, y3(t), to a level at which it can be properly converted tosound by near-end loudspeaker 41.

The near-end loudspeaker 41 receives the amplified and filteredcomposite audio signal, y4(t), from the audio amplifier 44. Theloudspeaker 42 is of a conventional type and converts this signal,y4(t), to sound in the at least partially enclosed near-end space 12.

The near-end space 12 has a characteristic impulse response, g2(t). Whenthe filtered and amplified composite audio signal, y4(t), is convertedto sound, the near-end space 12 produces an acoustical echo orreverberation, e2(t)=y4(t) * g2(t), in response. The echo, e2(t), is dueto the impulse response, g2(t), of the near-end space 12 and is theconvolution of the signal, y4(t), with the impulse response, g2(t).

The microphone 46 of the near-end audio system 32 detects the pressurewaves of the echo, e2(t), the near-end user's speech, s2(t), and thebackground noise, n2(t), in the near-end space 12. The microphone 46converts the detected pressure waves of these sounds to an analognear-end composite audio signal, y5(t). Thus, the composite audiosignal, y5(t), has (1) a speech component which corresponds to thenear-end speech, s2(t), (2) a noise component which corresponds to thebackground noise, n2(t), and (3) an echo component which corresponds tothe acoustical echo, e2(t).

From the microphone 46, the composite audio signal, y5(t), is providedto the conventional audio preamplifier 48 of the near-end audioelectronics 38. The audio preamplifier 48 amplifies the composite audiosignal, y5(t), with minimal introduction of noise, to a level at whichit can be properly processed by the echo canceler 30 and can be properlytransmitted by the transport system 28.

The audio line amplifier 49 of the near-end electronics 38 receives thepreamplified composite audio signal, y6(t). The audio line amplifier 49is of a conventional type and amplifies the composite audio signal,y6(t), so as to drive the low impedance loads of the echo canceler 30and the transport system 28. This amplified analog composite audiosignal, y7(t), is the output of the near-end audio system 32.

Thus, the near-end audio system 32 has two general functions. First, itconverts the composite input audio signal, y2(t), to sound in thenear-end space 12. Second, it converts the acoustical echo, e2(t). thenear-end speech, s2(t), and the near-end noise, n2(t), to the compositeoutput audio signal, y7(t). In view of this, it is clear that thenear-end audio system 32 and the near-end space 12 together form acombined system that has an overall impulse response, h2(t). Therefore,the composite output audio signal, y7(t), is the result of theconvolution of the composite input signal, y2(t), with the overallimpulse response, h2(t).

As is the case with the composite audio signal, y5(t), the compositeoutput audio signal, y7(t), of the audio system 32 has (1) a speechcomponent which corresponds to the near-end speech, s2(t), (2) a noisecomponent which corresponds to the background noise, n2(t), and (3) anecho component which corresponds to the acoustical echo, e2(t).Furthermore, the echo component, y2(t) * h2(t), of the composite outputaudio signal, y7(t), is the convolution of the near-end composite audioinput signal, y2(t), with the overall impulse response, h2(t).

The analog to digital (A/D) converter 50 of the echo canceler 30receives (1) the analog composite output audio signal, y7(t), from thenear-end audio system 32, (2) the analog spread spectrum signal, c(t),from the signal generator 34 and (3) the analog composite input audiosignal, y2(t), from the audio mixer 36. The A/D converter 50 is of aconventional type and converts these analog signals, y7(t), c(t), andy2(t), to the corresponding digital signals, y7(n), c(n), and y2(n). Asa result, the A/D converter 50 outputs each of these digital signals,y7(n), c(n), and y2(n), to the digital signal processor (DSP) 52 as asequence of discrete samples at a sampling rate approximately in therange of 8-64 KHz.

In the preferred embodiment, the A/D. converter 50 has a sampling rateof 8 kHz. This results in the samples of the digital signals, y7(n),c(n), and y2(n), being received by the DSP 52 at a rate of 8 KHz.

FIG. 3 provides a more detailed illustration of the DSP 52 of the echocanceler 30. It includes a central processing unit (CPU) 54 and a memory56. The memory 56 stores an adaptive filter routine 58 and across-correlation routine 60 which are run simultaneously by the CPU 54for echo cancellation purposes.

FIG. 4 provides an illustration of the operation of the DSP 52 in termsof the functions of the adaptive filter routine 58 and thecross-correlation routine 60. As shown in FIG. 4, steps 62-76 pertain tothe functions of the adaptive filter routine 58 while the steps 78-84pertain to the functions of the cross-correlation routine 60.

The echo component, y2(n) * h2(n), of the digital near-end compositeoutput audio signal, y7(n), is the convolution of the digital near-endcomposite audio input signal, y2(n), with the discrete time overallimpulse response, h2(n), of the combined system formed by the near-endspace 12 and the near-end audio system 32. In general terms, thecross-correlation routine 60 provides a method for cross-correlating thenear-end composite output audio signal, y7(n), with the digital spreadspectrum code signal; c(n), to produce a first estimate, h1n, of theoverall impulse response, h2(n). And, the adaptive filter routine 58provides a least-mean-squares type method for generating a secondestimate, h2n, of the overall impulse response, h2(n).

If near-end speech, s2(t), is present, the adaptive filter routine 58will convolve the digital near-end composite input audio signal, y2(n),with the first impulse response estimate, h1n, generated by thecross-correlation routine 60. However, if there is no near-end speech,s2(t), then the adaptive filter routine 58 will convolve the signal,y2(n), with the second impulse response estimate, h2n, it has generated.In either case, the signal resulting from the convolution is subtractedfrom the near-end audio output signal y7(n), to remove the earlierdescribed echo component, y2(n) * h2(n).

More specifically, for the adaptive filter routine 58, the first step 62is to read in the next samples of (1) the digital near-end compositeinput audio signal, y2(n), (2) the digital near-end composite outputaudio signal, y7(n), and (3) the digital spread spectrum signal, c(n).The samples for these signals, y2(n), y7(n), and c(n), are all providedby the A/D converter 50.

Once these samples are read in, the next step 64 is for the adaptiveroutine 58 to generate (1) a spread spectrum sample vector, C1n, for thespread spectrum signal, c(n), and (2) a composite input sample vector,Y2n, for the near-end composite input audio signal, y2(n). The spreadspectrum sample vector, C1n, for the spread spectrum signal, c(n), has alength, N1, and contains the N1 most recently read-in samples of thespread spectrum signal, c(n), including the sample read in during step62. The composite input sample vector, Y2n, has a length, N2, andcontains in reverse discrete time order the N2 most recently read-insamples of the near-end composite input audio signal, y2(n), includingthe sample read in during step 62.

The length, N1, of the spread spectrum sample vector, C1n, is chosensuch that the adaptive filter routine 58 can quickly detect the onset ofnear-end speech, s2(t). This length, N1, can be approximately in therange of 5-50 samples. In the preferred embodiment, the length N1 of thesample vector, C1n, is six.

The length, N2, of the composite input sample vector, Y2n, is equal tothe length of the estimated impulse responses, h1n and h2n. This length,N2, can be approximately in the range of 300-2,000 samples and is chosento be sufficient for high fidelity modeling of the overall impulseresponse, h2(n). However, in the preferred embodiment the length, N2, is400 samples.

In step 66, the adaptive filter routine 58 computes a decision value,d(n). This decision value, d(n), is computed by first computing theinner product of the spread spectrum sample vector, C1n, and the outputsample vector, Y9n-1, computed during the previous loop in step 70. Thisinner product is then divided by the inner product of the previousoutput sample vector, Y9n-1, with itself. As will be discussed laterwith respect to steps 68 and 72, the decision value, d(n), is high whennear-end speech, S2(t), is not present and is low when near-end speech,s2(t), is present.

In the following step 68, the adaptive filter routine 58 generates adigital echo estimation signal, yS(n). As was indicated earlier, theecho component of the analog signal, y7(t), is the convolution of theanalog near-end composite audio input signal, y2(t), with the overallimpulse response, h2(t). The digital echo estimation signal, yS(n), istherefore used to estimate the echo component of the correspondingdigital signal, y7(n), and is computed in the following manner.

As was suggested earlier and as will be discussed later with respect tostep 72, if near-end speech is not present, then the decision value,d(n), is high. If in this case the decision value exceeds a predefinedthreshold value, T, the adaptive filter routine 58 generates the echoestimation signal yS(n) by computing the inner product of the compositeinput sample vector, Y2n, and the impulse response estimate, h2n-1,generated by the adaptive filter routine 58 in step 76 during theprevious loop. Since the samples of the composite input sample vector,Y2n, are in reversed time order, this inner product is the convolutionof the composite input audio signal, y2(n), with the impulse responseestimate, h2n-1.

On the other hand, if near-end speech, s2(t), is present, the decisionvalue d(n) is low. This will be described in detail with respect to step72. If the decision value d(n) does not exceed the threshold value, T,the adaptive filter routine 58 generates the echo estimation signalyS(n) by computing the inner product of the composite input samplevector, Y2n, and the impulse response estimate, h1n, generated by thecross-correlation routine 60 in step 84. This inner product is theconvolution of the composite input audio signal, y2(n), with the impulseresponse estimate, h1n.

In step 70, the adaptive filter routine 58 generates (1) a digitalnear-end output audio signal, y9(n), and (2) a near-end output samplevector, Y9n. The output audio signal, y9(n), is produced by subtractingthe echo estimation signal, yS(n), generated in step 68 from thenear-end composite output audio signal, y7(n), provided by the A/Dconverter 50. The near-end output sample vector, Y9n, has a length equalto the length, N1, of the spread spectrum sample vector, C1n, andcontains the N1 most recent samples of the near-end output audio signal,y9(n), generated by the adaptive filter routine 58 in step 70.

Because of the subtraction performed in step 70, substantially all ofthe earlier described echo component, y2(n) * h2(n), of the near-endcomposite output audio signal, y7(n), is canceler from this signal,y7(n). The result is the substantially echoless digital near-end outputaudio signal y9(n). As shown in FIG. 2, this signal, y9(n), is theoutput of the DSP 52 and is provided to the digital to analog (D/A)converter 86.

Step 72 is a decision step for the adaptive filter routine 58. In thisstep 72, the adaptive filter routine 58 determines whether or not thedecision value, d(n), computed in step 56 exceeds the threshold value,T.

As was indicated earlier, the decision value, d(n), will not exceed thethreshold value, T, when near-end speech, s2(t), is present. This can beexplained as follows. When near-end speech, s2(t), is present, thenear-end composite output audio signal, yT(n), will grow in amplitude.This occurs because the signal, yT(n), will have a componentcorresponding to the near-end speech, s2(t). Therefore, this signal,y7(n), will be substantially different from the composite input audiosignal, y2(n). Then, when these two signals, y7(n) and y2(n), aresubtracted in step 70, the result will be a large near-end output audiosignal, y9(n). Thus, the most recent samples of the near-end outputsample vector, Y9n, computed in step 70 will be relatively large inamplitude. As a result, a small value for the decision value, d(n), willhave been computed in step 66 because of the large value of the innerproduct of the output sample vector, Y9n, with itself compared to thesmaller value of the inner product of the output sample vector, Y9n,with the spread spectrum sample vector, C1n.

And, as was also suggested earlier, when near-end speech, s2(t), isabsent, the decision value, d(n), will exceed the threshold value, T.This occurs because the near-end composite output audio signal, yT(n),no longer has a component corresponding to near-end speech, s2(t).Therefore, this signal, y7(n), will not be substantially different fromthe composite input audio signal, y2(n). Furthermore, when these twosignals, yT(n) and y2(n), are subtracted in step 70, the result will bea small near-end output audio signal, y9(n). Thus, the most recentsamples of the near-end output sample vector, Y9n, computed in step 70will be relatively small in amplitude. As a result, a large value forthe decision value, d(n), will have been computed in step 66 because ofthe small value of the inner product of the output sample vector, Y9n,with itself compared to the comparable value of the inner product of theoutput sample vector, Y9n, with the spread spectrum sample vector, C1n.

If the decision value, d(n), computed in step 66 does not exceed thethreshold value, T, then the adaptive filter 58 bypasses the steps 74and 76 and begins a new loop at the step 62. Thus, the adaptive filterroutine 58 continues to use the impulse response estimate, h1n, of thecross-correlation routine 60 to compute the echo estimation signal,yS(n), in step 68 until the decision value, d(n), computed in step 66exceeds the threshold value, T.

If the decision value, d(n), computed in step 66 does exceed thethreshold value, T, then the adaptive filter 58 performs steps 74 and 76before beginning a new loop at step 62. Thus, the adaptive fillerroutine 58 continues to use the impulse response estimate, h2n-1, of thecross-correlation routine 60 to compute the echo estimation signal,yS(n), in step 68 until the decision value, d(n), computed in step 66does not exceed the threshold value, T.

The threshold value, T, is selected so that the decision value, d(n),will exceed it when near-end speech, s2(t), is absent and will notexceed it when near-end speech, s2(t), is present. The threshold value,T, is 0.5 in the preferred embodiment.

In the following step 74, the adaptive filter routine 58 computes anestimate of the component, Zn, of the composite input sample vector,Y2n, which is orthogonal to the composite input sample vector, Y2n-1, ofthe previous loop. This orthogonal component vector, Zn, has a lengthequal to the length, N2, of the vector, Y2n.

This is done by first computing the inner product of the composite inputsample vector, Y2n, with the composite input sample vector, Y2n-1, fromthe previous loop. This inner product is then divided by the innerproduct of the vector, Y2n-1, with itself. Then the product of thisratio and the vector, Y2n-1, is subtracted. from the vector, Y2n, toproduce the orthogonal vector, Zn.

As mentioned earlier, the length, N2, of the orthogonal componentvector, Zn, can be approximately in the range of 300-2,000 samples. And,in the preferred embodiment the length, N2, is 400 samples.

The next step 76 of the adaptive routine 58 is to compute an updatedleast-squares estimate, h2n, of the discrete time overall impulseresponse, h2(n), of the combined system formed by the near-end space 12and the near-end audio system 32. This is done by first computing theproduct of the decision value, d(n), and the near-end output audiosignal, y9(n). This product is then divided by the inner product of thecomposite input sample vector, Y2n, and the orthogonal component vector,Zn. The resulting scaler, is multiplied by the vector, Zn, to produce acorrection vector. This correction vector is then added to theleast-mean-square impulse response estimate, h2n-1, from the previousloop to produce the updated least-mean-square impulse response estimate,h2n.

As was mentioned earlier, the updated impulse response estimate, h1n,has a length, N2. And, as was also mentioned earlier, this length, N2,can be approximately in the range of 300-2,000 samples and is chosen tobe sufficient for high fidelity modeling of the overall impulseresponse, h2(n). In the preferred embodiment the length, N2, is 400samples.

Upon completion of step 76, the adaptive filter routine 58 returns tostep 62 to begin a new loop. However, at the same time that the adaptivefilter routine 58 is running the cross-correlation routine 60 is alsorunning.

The first step 78 of the cross-correlation routine 50 is to (1) generatea near-end composite output sample vector, Y7n, for the near-endcomposite output audio signal, y7(n), and (2) generate a second spreadspectrum sample vector, C2n, for the spread spectrum signal, c(n). Thenear-end composite output signal, y7(n), and the spread spectrum signal,c(n), are read in by the adaptive filter routine 58 in step 62.

The spread spectrum sample vector, C2n, has a length, N3, and containsthe N3 most recently read-in samples of the spread spectrum signal,c(n). The near-end output sample vector, Y7n, has the same length, N3,as does the spread spectrum sample vector, C2n, and contains the N3 mostrecently read-in samples of the near-end composite output audio signal,y7(n). This length, N3, can be approximately in the range of4,000-300,000 samples and is chosen to be sufficient for propercross-correlation of the near-end composite output audio signal, yT(n),and the spread spectrum signal, c(n).

In step 80, the cross-correlation routine 60 computes the product, H, ofthe Fast Fourier Transform (FFT) of the near-end composite output samplevector, Y7n, and the complex conjugate of the FFT of the spread spectrumsample vector, C2n. This produces the FFT of the impulse responseestimate, h3n, computed in the next step 82.

In step 82, as was just suggested, the cross-correlation routine 60computes the impulse response estimate, h3n. This is accomplished bycomputing the real portion of the Inverse Fast Fourier Transform (IFFT)of the product, H, computed in step 80 and dividing it by the length,N3, of the spread spectrum vector, C2n.

The impulse response estimate, h3n, has a length, N2. As was mentionedearlier, this length, N2, can be approximately in the range of 300-2,000samples and is chosen to be sufficient for high fidelity modeling of theoverall impulse response, h2(n). As was also mentioned, in the preferredembodiment the length, N2, is 400 samles.

The computation in step 82 together with that in step 80 provides acircular cross-correlation of the near-end composite output audiosignal, y7(n), and the spread spectrum signal, c(n). The result is theaccurate impulse response estimate, h3n, during near-end speech, s2(t).

The just described FFT/IFFT method of computing an estimate of thecross-correlation of the signals, y7(n) and c(n), is just one possibleway to make the computation efficient. Another way would be to computethe time average product of the composite output sample vector, Y7n,with the spread spectrum sample vector, C2n.

Step 84 of the cross-correlation routine 60 makes the impulse responseestimate, h3n, even more accurate. This is accomplished by averaging thecurrent estimate, h3n, along with the 100 most recent estimates computedin step 82 to form the impulse response estimate, h1n.

Like the impulse response estimate, h3n, the averaged impulse responseestimate, h1n, has a length, N2. As was mentioned earlier, this length,N2, can be approximately in the range of 300-2,000 samples and in thepreferred embodiment the length, N2, is 400 samples.

The averaged impulse response estimate, h1n, is continuously availableto the adaptive filter routine 58 but used only when the decision valued(n) does not exceed the threshold value, T. Upon completion of step 84,the cross-correlation routine 60 returns to step 78 to begin the nextloop.

Returning to FIG. 1, the digital near-end output audio signal, y9(n),produced by the adaptive filter routine 58 is then outputted by tile DSP52 to the digital-to-analog converter (D/A) 86. The D/A converter 86 isof a conventional type and converts the digital near-end output audiosignal, y9(n), to its corresponding analog signal, y9(t).

The analog near-end output audio signal, y9(t) is then transmitted bythe transport system 28 to the far-end communication device 18. Thistransmitted signal, y9(t), suffers only a minor amount of distortionduring the transmission process and is received by the far-endcommunication device 18 as the analog far-end input audio signal, v3(t).

The far-end input audio signal (i.e. the near-end output audio signal),v3(t), is then filtered and/or amplified with the conventional audioelectronics 26 of the far-end audio system 20 to produce the far-endaudio signal, v4(t). This is done so that the audio signal, v4(t), canbe properly converted to sound by the loudspeaker 88 of the far-endaudio system 20.

The far-end loudspeaker 88 receives the audio signal, v4(t), from theaudio electronics 26. The loudspeaker 42 is of a conventional type andconverts this signal, v4(t), to sound. As a result, the far-end echo,e1(t)=v4(t) * g1(t), is produced in the far-end space 14 due to thecharacteristic impulse response, g1(t), of the far-end space 14. Theecho, e1(t), is the convolution of the signal, v4(t), with the impulseresponse, g2(t).

As was described earlier, the microphone 22 detects the pressure wavesof the far-end speech, s1(t), and the far-end background noise, n1(t),and the far-end echo, e1(t). Therefore, when the composite input audiosignal, y2(t), is converted to sound by the near-end audio system 32,the near-end user will hear far-end speech and background noisedistorted by the far-end echo.

In order to alleviate this problem, a far-end echo canceler 90 can beadded to the far-end communication device 18, as shown in FIG. 5. Theecho canceler 90 is configured like the echo canceler 30 describedearlier. It removes the echo component of the far-end composite outputaudio signal, v2(t), which corresponds to the acoustical echo, e1(t).This echo component is due to the overall impulse response, h1(t), ofthe combined system formed by the far-end space 14 and the far-end audiosystem 20. Thus, the echo canceler 90 uses the same method discussedearlier with respect to echo canceler 30 for generating an estimate ofthe discrete time overall impulse response, h1(t). This estimate is thenused by the echo canceler 90 in order to remove the echo component ofthe far-end composite output audio signal, v2(t), and produce inresponse the far-end output signal, v5(t).

If either of the far-end or near-end communication devices 16 or 18 area telephone, the far-end user's head is for the most part coupled to theloudspeaker 88 so as to inhibit an echo, e1(t), from being produced inthe far-end space 14. As a result, the microphone 22 detects thepressure waves of the far-end speech, s1(t), and the far-end backgroundnoise, n1(t), and only a small amount of echo, e1(t), if at all. As aresult, when the composite input audio signal, y2(t), is converted tosound by the near-end audio system 32, the near-end user will hearfar-end speech and far-end background noise but will hear very littlefar-end echo. Thus, in the case where the communication device 16 or 18is a telephone, the addition of the far-end echo canceler 30 or 90 willnot have as drastic an effect in improving performance as is the casefor other types of communication devices. Nevertheless, the describedecho canceler 30 or 90 and associated method may be used with atelephone.

The earlier described communication device 16 or 18, near-end echocanceler 30 or 90, and associated method provide several significantadvantages over the prior art. These advantages are evident from theearlier description of the communication device 16, the echo canceler30, and associated method.

In particular, the cross-correlation produced by the cross-correlationroutine 60 enables the echo canceler and adaptive filter routine 58 togenerate an echo estimation signal, yS(n), which does not result in thesuppression of the component or the audio output signal, y7(t), whichcorresponds to the near-end speech, s2(t). In addition, unlike the prioran, the described method for switching between the impulse responseestimates, h1n and h2n, allows for duplex conversation (i.e. doubletalk). And lastly, the combination of the echo canceler and adaptivefilter routine 58 and the cross-correlation routine 60 allows for quickadaptation to changes in the actual overall impulse response, h(t), ofcombined system formed by the near-end space 12 and the near-end audiosystem 32.

Numerous other alternatives exist for the audio network 10. For example,in FIG. 2, rather than having the near-end echo canceler 30 and thenear-end audio electronics 38 located within the near-end space 12, bothor portions of both may be located external to the near-end space 12,Furthermore, the near-end audio system 32 may include multipleloudspeakers 42 and/or multiple microphones 46. In the event that theaudio system 32 includes multiple microphones 46, the audio preamplifier48 will be replaced by a conventional audio mixer which includes apreamplifier and which is coupled to each of the multiple microphones46.

While the present invention has been described with reference to a fewspecific embodiments, the description is illustrative of the inventionand is not to be construed as limiting the invention. Variousmodifications may occur to those skilled in the art without departingfrom the true spirit and scope of the invention as defined by theappended claims.

What is claimed is:
 1. A communication device comprising:a signalgenerator for generating a pseudonoise signal; an audio mixer responsiveto an input audio signal and said pseudonoise signal for combining saidinput audio signal with said pseudonoise signal to produce a firstcomposite signal; an audio system responsive to said first compositesignal for convening said first composite signal to sound in an at leastpartially enclosed space, said at least partially enclosed spaceproducing an acoustical echo in response, said audio system also forconverting said acoustical echo and other sounds in said at leastpartially enclosed space to a second composite signal, said secondcomposite signal including an echo component corresponding to saidacoustical echo, said at least partially enclosed space and said audiosystem together forming a combined system having an overall impulseresponse; means responsive to said second composite signal and saidpseudonoise signal for generating a first estimate of said overallimpulse response; means responsive to said first composite signal andsaid first estimate for generating an echo estimation signalcorresponding to an estimate of said echo component of said secondcomposite signal; and means for subtracting said echo estimation signalfrom said second composite signal to produce an output audio signal. 2.The device of claim 1 wherein said means for generating said firstestimate includes means for cross-correlating said second compositesignal and said psneudonoise signal.
 3. The device of claim 2 whereinsaid means for generating said echo estimation signal includes means forconvolving said first composite signal with said first estimate.
 4. Thedevice of claim 1 further comprising:means responsive to said outputaudio signal and said pseudonoise signal for computing a decision value;wherein said means for generating said echo estimation signal includesfirst means responsive to said decision value and to said first estimatefor producing said echo estimation signal based on said first estimateonly when said decision value does not exceed a predefined thresholdvalue.
 5. The device of claim 4 further comprising:means responsive tosaid first composite signal and said output signal for generating asecond estimate of said overall impulse response; wherein said means forgenerating said echo estimation signal includes second means responsiveto said decision value and to said second estimate for producing saidecho estimation signal based on said second estimate only when saiddecision value exceeds said threshold value.
 6. The device of claim 5wherein:said means for generating said first estimate includes means forcross-correlating said second composite signal and said pseudonoisesignal; and said first means includes means for convolving said firstcomposite signal with said first estimate; said second means includesmeans for convolving said first composite signal with said secondestimate.
 7. An acoustical echo cancellation apparatus for use with anaudio system, said audio system responsive to a first composite signalfor converting said first composite signal to sound in an at leastpartially enclosed space, said at least partially enclosed spaceproducing an acoustical echo in response, said audio system also forconverting said acoustical echo and other sounds in said at leastpartially enclosed space to a second composite signal, said secondcomposite signal including an echo component corresponding to saidacoustical echo, said at least partially enclosed space and said audiosystem together forming a combined system having an overall impulseresponse, said apparatus comprising:a signal generator for generating apseudonoise signal; an audio mixer responsive to an input audio signaland said psneudonoise signal for combining said input audio signal withsaid pseudonoise signal to produce said first composite signal; meansresponsive to said second composite signal and said pseudonoise signalfor generating a first estimate of said overall impulse response; meansresponsive to said first composite signal and said first estimate forgenerating an echo estimation signal corresponding to an estimate ofsaid echo component of said second composite signal; and means forsubtracting said echo estimation signal from said second compositesignal to produce said output audio signal.
 8. The apparatus of claim 7wherein said means for generating said first estimate.[.cross-correlates.]. .Iadd.includes means for cross-correlating.Iaddend.said second composite signal and said pseudonoise signal. 9.The apparatus of claim 8 wherein said means for generating said echoestimation signal includes means for convolving said first compositesignal with said first estimate.
 10. The apparatus of claim 7 furthercomprising:means responsive to said output audio signal and saidpseudonoise signal for computing a decision value; wherein said meansfor generating said echo estimation signal includes first meansresponsive to said decision value and to said first estimate forproducing said echo estimation signal based on said first estimate onlywhen said decision value does not exceed a predefined threshold value.11. The apparatus of claim 10 wherein said first means includes meansfor convolving said first composite signal with said first estimate. 12.The apparatus of claim 11 wherein said means for generating said firstestimate includes means for cross-correlating said second compositesignal and said pseudonoise signal.
 13. The apparatus of claim 10further comprising:means responsive to said first composite signal andsaid output signal for generating a second estimate of said overallimpulse response; wherein said means for generating said echo estimationsignal includes second means responsive to said decision value and tosaid second estimate for producing said echo estimation signal based onsaid second estimate only when said decision value exceeds saidthreshold value.
 14. The apparatus of claim 13 wherein said second meansincludes means for convolving said first composite signal with saidsecond estimate.
 15. The apparatus of claim 14 wherein:said means forgenerating said first estimate includes means for cross-correlating saidsecond composite signal and said psnudonoise signal; and said firstmeans includes means for convolving said first composite signal withsaid first estimate.
 16. A method of acoustical echo cancellation foruse with an audio system, said audio system responsive to a firstcomposite signal for converting said first composite signal to sound inan at least partially enclosed space, said at least partially enclosedspace producing an acoustical echo in response, said audio system alsofor converting said acoustical echo and other sounds in said at leastpartially enclosed space to a second composite signal, said secondcomposite signal including an echo component corresponding to saidacoustical echo, said at least partially enclosed space and said audiosystem together forming a combined system having an overallcharacteristic impulse response, said method comprising the stepsof:generating a pseudonoise signal; combining an input audio signal withsaid pseudonoise signal to form said first composite signal; generatinga first estimate of said overall impulse response in response to saidsecond composite signal and said pseudonoise signal; generating an echoestimation signal corresponding to an estimate of said echo component inresponse to said first composite signal and said first estimate; andsubtracting said echo estimation signal from said second compositesignal to produce an output signal.
 17. The method of claim 16 whereinsaid step of generating said first estimate includes the step ofcross-correlating said second composite signal and said.[.pseudorandom.]. .Iadd.pseudonoise .Iaddend.signal.
 18. The method ofclaim .[.17.]. .Iadd.16 .Iaddend.further comprising the stepsof:computing a decision value in response to said output signal and saidpseudonoise signal; wherein said step of generating said echo estimationsignal includes the step of producing said echo estimation signal basedon said first estimate only when said decision value does not exceed apredefined threshold value.
 19. The method of claim 18 furthercomprising the step of:generating a second estimate of said impulseresponse in response to said first composite signal and said outputsignal; wherein said step of generating said echo estimation signalincludes the step of producing said echo estimation signal based on saidsecond estimate only when said decision value exceeds said thresholdvalue.
 20. The method of claim 18 wherein said step of producing saidecho estimation signal based on said first estimate includes the step ofconvolving said first composite signal with said first estimate.
 21. Themethod of claim 20 wherein said step of generating said first estimateincludes the step of cross-correlating said second composite signal andsaid pseudonoise signal.
 22. The method of claim .[.21.]. .Iadd.19.Iaddend.wherein said step of producing said echo estimation signalbased on said second estimate includes the step of convolving said.[.second.]. .Iadd.first .Iaddend.composite signal with said secondestimate.
 23. The method of claim 22 wherein:said step of generatingsaid first estimate includes the step of cross-correlating said secondcomposite signal and said pseudonoise signal; and said step of producingsaid echo estimation signal based on said first estimate includes thestep or convolving said first composite signal with said first estimate.24. The method of claim 17 wherein said step of generating said echoestimation signal includes the step of convolving said first compositesignal with said first estimate.